﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PFMGlobals;

namespace PFMHandlers
{
    public class PFMHandlerFactory
    {
        public static PFMHandler CreateHandler(string sHandler)
        {
            PFMHandler result=null;
            if (sHandler.ToUpper().Equals(PFMDefinitions.FILEHANDLER))
                result = PFMFileHandlerFactory.CreateHandler();
            if (sHandler.ToUpper().Equals(PFMDefinitions.ZIPHANDLER))
                result =  PFMZipHandlerFactory.CreateHandler();
            if (sHandler.ToUpper().Equals(PFMDefinitions.UNZIPHANDLER))
                result =  PFMUnZipHandlerFactory.CreateHandler();
            if (sHandler.ToUpper().Equals(PFMDefinitions.DIRECTORYHANDLER))
                result = PFMDirectoryHandlerFactory.CreateHandler();
            return result;
        }
    }
}
